package com.lagou.edu.ssssession;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;

@SpringBootApplication
@EnableJpaRepositories(basePackages = "com.lagou.edu.ssssession.repository" )
@EnableRedisHttpSession
public class SssSessionApplication extends SpringBootServletInitializer {

	public static void main(String[] args) {
		SpringApplication.run(SssSessionApplication.class, args);
	}

	/**
	 * 工程打成war需要继承SpringBootServletInitializer，重写configure方法
	 * @date 2018年12月7日
	 * @author zxp
	 */
	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
		return builder.sources(SssSessionApplication.class);
	}

}
